<?php
$this->lang->load('template');
//$this->lang->load('validation');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0042)http://www.fav365.com/ball/?m=admin&c=good -->
<HTML>
<HEAD>
<TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>
<LINK href="/css/admin.css" 
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3395" name=GENERATOR>
<script src="/js/global.js" type="text/javascript"></script>
</HEAD>
<BODY>
<DIV class=admin_box>
  <DIV class=admin_boxtop></DIV>
  <DIV class=admin_boxmain>
    <TABLE cellSpacing=1 cellPadding=0 width="96%" align=center border=0>
      <TBODY>
        <TR>
          <TD><H1 class=title><?=$this->lang->line('tpl_article').$this->lang->line('tpl_lists')?></H1></TD>
        </TR>
      </TBODY>
    </TABLE>
    <?php
$url = site_url('categories/index?template=options&selected='.intval($_GET['cat_id']));
$options = file_get_contents($url);
$data = array(
	'action' => '/index.php/articles/admin',
	'sortfiled' => array('id'=>$this->lang->line('tpl_create_on'),'update_on'=>$this->lang->line('tpl_update_on')),
	'sfield'	=> array('title'=>$this->lang->line('tpl_title'),'content'=>$this->lang->line('tpl_content')),
	'options' => array(
			'article_type' => array('-100'=>$this->lang->line('tpl_article_type'),'0'=>$this->lang->line('tpl_article_type_normal'),'1'=>$this->lang->line('tpl_article_type_top')),
			'is_open' => array('-100'=>$this->lang->line('tpl_ishow'),'0'=>$this->lang->line('tpl_no'),'1'=>$this->lang->line('tpl_yes')),
		),
	'others' => '<SELECT name="cat_id"><option value="-100">'.$this->lang->line('tpl_plsselect').$this->lang->line('tpl_cates').'</option>'.$options.'</SELECT>',
);
$this->load->view('admin/_searchbar',$data);
?>
    <FORM id=postform name=postform action="<?=site_url('articles/remove')?>" method=post onSubmit="return checks();">
      <TABLE class=table cellSpacing=1 cellPadding=5 width="96%" align=center border=0 id="checkList">
        <TBODY>
          <TR>
            <TD class=tdbg width="5%"><?=$this->lang->line('tpl_selected')?></TD>
            <TD class=tdbg width="40%"><DIV align=center><STRONG><?=$this->lang->line('tpl_article').$this->lang->line('tpl_title')?></STRONG></DIV></TD>
            <TD class=tdbg width="10%"><DIV class=STYLE1 align=center>
                <DIV align=center>
				<?=$this->lang->line('tpl_template')?>
				</DIV>
              </DIV></TD>
            <TD class=tdbg width="10%"><DIV class=STYLE3 align=center>
                <DIV align=center>
				<?=$this->lang->line('tpl_link')?>/<?=$this->lang->line('tpl_pic')?>
				</DIV>
              </DIV></TD>
            <TD class=tdbg width="10%"><DIV class=STYLE1 align=center>
                <DIV align=center><?=$this->lang->line('tpl_ishow')?>/<?=$this->lang->line('tpl_istop')?></DIV>
              </DIV></TD>
			  <TD class=tdbg width="10%"><DIV class=STYLE1 align=center>
                <DIV align=center><?=$this->lang->line('tpl_update_on')?></DIV>
              </DIV></TD>
            <TD class=tdbg width="15%"><DIV align=center><STRONG><?=$this->lang->line('tpl_actions')?></STRONG></DIV></TD>
          </TR>
          <?php
		  $users = $rs['resultset'];
		  foreach($users as $key=>$val):
		  ?>
          <TR class=tr2 align=middle>
            <TD width="5%"><INPUT type=checkbox value=<?=$val['id']?> name=id[] onClick="sets(this)"></TD>
            <TD width="15%" class="userList">
			[<?=$val['name']?>]
			<a href="<?=site_url(array('articles','view',$val['id']))?>" target="_blank">
			<?=$val['title']?></a></TD>
            <TD width="20%"><?=$val['template']?></TD>
            <TD>
			<?php if($val['link']):?>
			<a href="<?=$val['link']?>" target="_blank">
			<?=$this->lang->line('tpl_yes')?>
			</a>
			<?php else: ?>
			<?=$this->lang->line('tpl_no')?>
			<?php endif;?>
			/
			<?php if($val['file_url']):?>
			<a href="<?=get_img_url($val['file_url'],$this->configure['upload_photo_path']);?>" target="_blank">
			<?=$this->lang->line('tpl_yes')?>
			</a>
			<?php else: ?>
			<?=$this->lang->line('tpl_no')?>
			<?php endif;?>
			</TD>
            <TD><?php if ($val['is_open']):?>
              <?=$this->lang->line('tpl_yes')?>
              <?php else:?>
              <?=$this->lang->line('tpl_no')?>
              <?php endif;?>/
			  <?php if ($val['article_type']):?>
              <?=$this->lang->line('tpl_yes')?>
              <?php else:?>
              <?=$this->lang->line('tpl_no')?>
              <?php endif;?>
            </TD>
			<TD><?=date("Y-m-d",$val['update_on'])?></TD>
            <TD><A href="<?=site_url(array('articles','edit',$val['id']));?>"><?=$this->lang->line('tpl_act_edit')?></A> </TD>
          </TR>
          <?php
		  endforeach;
		  ?>
          <TR class=tr_fff>
            <TD align=left colSpan=7><?php if(isset($rs['pager'])){ echo '<span class="msdn">'.$rs['pager']->create_links().'</span>';}?>
              <INPUT class=btn onClick="CheckAll('checkList',true)" type=button value="<?=$this->lang->line('tpl_selectall')?>">
              <INPUT class=btn onClick="CheckAll('checkList',false)" type=button value="<?=$this->lang->line('tpl_cancel')?>">
              <INPUT class=btn  type="submit" value="<?=$this->lang->line('tpl_act_remove')?>">
              <INPUT class=btn onClick="window.location.href='<?=site_url('articles/add')?>'" type=button value="<?=$this->lang->line('tpl_act_add')?>">
              <INPUT  id=h_delid type=hidden name=h_delid>
            </TD>
          </TR>
        </TBODY>
      </TABLE>
    </FORM>
  </DIV>
  <DIV class=admin_boxbottom> </DIV>
</DIV>
</BODY>
</HTML>
